import request from '@/utils/request'
export default {
  listAll(data) {
    return request({
      url: `/admin/core/quartz/list`,
      method: 'get',
      params: data
    })
  },

  saveOrUpdate(data) {
    return request({
      url: '/admin/core/quartz/saveOrUpdate',
      method: 'post',
      data: data
    })
  },

  listById(id) {
    return request({
      url: `/admin/core/quartz/info/${id}`,
      method: 'get'
    })
  },

  removeById(id) {
    return request({
        url: `/admin/core/quartz/remove/${id}`,
        method: 'post'
    })
  },

  stopWork(id) {
    return request({
      url: `/admin/core/quartz/stopJob/${id}`,
      method: 'post'
    })
  },

  resumeWork(id) {
    return request({
      url: `/admin/core/quartz/resumeJob/${id}`,
      method: 'post'
    })
  },

  runWork(id) {
    return request({
      url: `/admin/core/quartz/runJob/${id}`,
      method: 'post'
    })
  },

  listLog(data) {
    return request({
      url: `/admin/core/quartzLog/list`,
      method: 'get',
      params: data
    })
  }
}